import {JSONContent} from "@tiptap/react";

export interface Mp3{
    videoUrl:string
    lyric:JSONContent
}

export interface Paragraph{
    start:number
    end:number
    text:string
    words:Word[]
}

export interface Word{
    start:number
    end:number
    word:string
}

export interface Mp3Player extends Mp3Attrs,Mp3Methods{}
export interface Mp3Attrs{
    type:"mpeg"
    src:string
    start:number
    duration:number//总时长（秒）
    currentTime:number//当前时长（秒）
    a:number
    b:number
    paused:boolean//是否暂停
    volume:number//音量（0.0 到 1.0）
}
export interface Mp3Methods{
    play:()=>void//播放
    pause:()=>void//暂停
    load:()=>void//重新加载
    setA:()=>void
    setB:()=>void
    setCurrentTime:()=>void
}